# -*- coding: utf-8 -*-
# @Time        :2024/10/10 下午4:25
# @Author      :文刀水寿
# @File        : 03_类和对象.py
"""
 @Description :演示类和对象的关系，即面向对象的编程思想
"""


# 设计一个闹钟类
class Clock:
    id = None
    price = None

    def ring(self):
        import winsound
        winsound.Beep(2000, 3000)


clock1 = Clock()
clock1.id = "003023"
clock1.price = 19.99
print(f"闹钟ID：{clock1.id}, 价格：{clock1.price}")
clock1.ring()
